From: Carlos Garnacho Date: Mon, 18 Aug 2025 16:59:49 +0000 (+0200) Subject: slider: Flip horizontal scroll coordinates in RTL languages X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~104^2^2~14 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=83364f7db323babf6a12bc0a398c5af93aa3df22;p=gnome-shell.git slider: Flip horizontal scroll coordinates in RTL languages In those languages, the horizontal axis still grows positively towards the right, which means we need to invert left and right as they come from scroll events, in order to have the expected effect. Part-of: --- diff --git a/js/ui/slider.js b/js/ui/slider.js index ebeb0d4f3..2cf5f145b 100644 --- a/js/ui/slider.js +++ b/js/ui/slider.js @@ -177,6 +177,8 @@ export const Slider = GObject.registerClass({ // Match physical direction if (event.get_scroll_flags() & Clutter.ScrollFlags.INVERTED) nSteps *= -1; + if (this.get_text_direction() === Clutter.TextDirection.RTL) + nSteps *= -1; } this.step(nSteps);